package com.whmall.service.crm.provider;

import com.whmall.component.entity.dto.OperatorReqDTO;
import com.whmall.service.crm.api.CompanyIndustryTypeApi;
import com.whmall.service.crm.entity.dto.company.CompanyIndustryTypeCreateOrUpdateDTO;
import com.whmall.service.crm.entity.dto.company.CompanyIndustryTypeRspDTO;
import org.apache.dubbo.config.annotation.DubboService;
import com.whmall.service.crm.module.company.service.CompanyIndustryTypeService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.Map;

@DubboService(interfaceClass = CompanyIndustryTypeApi.class)
public class CompanyIndustryTypeProvider implements CompanyIndustryTypeApi{

    @Autowired
    private CompanyIndustryTypeService companyIndustryTypeService;

    @Override
    public void saveOrUpdate(CompanyIndustryTypeCreateOrUpdateDTO createOrUpdateDTO, OperatorReqDTO operatorReqDTO) {
        companyIndustryTypeService.saveOrUpdate(createOrUpdateDTO,operatorReqDTO);
    }

    @Override
    public Map<Long, List<CompanyIndustryTypeRspDTO>> getByCompanyIds(List<Long> companyIdList) {
        return companyIndustryTypeService.getByCompanyIds(companyIdList);
    }

    @Override
    public Boolean selectByIdsShareLock(List<Long> ids) {
        return companyIndustryTypeService.selectByIdsShareLock(ids);
    }
}